<template>
  <div>
        <p>{{result}}</p>
        <button @click="getState">获取state</button>
  </div>
</template>

<script>
 export default {
   data () {
     return {
        result:''
     }
   },
   methods: {
    getState(){
    
         console.log("modulesA userName: " + this.$store.state.moduleA.userName);
         this.result =  this.$store.state.moduleA.userName;

    }
   }    
 }
</script>

<style scoped>

 
</style>
